package com.onehash.onebilling.gui;

import java.awt.Frame;
import javax.swing.JOptionPane;


public class MessageDialog {
    public static int YES_OPTION=JOptionPane.YES_OPTION;
    public static int NO_OPTION=JOptionPane.NO_OPTION;

    public static void showErrorDialog(Frame frame, String title, String msg) {
        JOptionPane.showMessageDialog(frame, msg, title, JOptionPane.ERROR_MESSAGE);
    }

    public static void showInfoDialog(Frame frame, String title, String msg) {
        JOptionPane.showMessageDialog(frame, msg, title, JOptionPane.INFORMATION_MESSAGE);
    }

    public static int showQuestionDialog(Frame frame, String title, String msg){
        int option;
        option=JOptionPane.showConfirmDialog(frame, msg, title,
                                             JOptionPane.YES_NO_OPTION,
                                             JOptionPane.QUESTION_MESSAGE);
        return option;
    }
}
